<?php

namespace BaseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Recharge
 *
 * @ORM\Table(name="recharge", options={"comment":"充值表"})
 * @ORM\Entity()
 */
class Recharge
{
    public static $type_array = array(
        1 => '支付宝',
        2 => '微信',
        3 => '银联'
    );

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var User
     *
     * @ORM\ManyToOne(targetEntity="BaseBundle\Entity\User", inversedBy="id")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     */
    private $user;

    /**
     * @var integer
     *
     * @ORM\Column(name="type", type="smallint", options={"comment":"充值方式"})
     */
    private $type;

    /**
     * @var boolean
     *
     * @ORM\Column(name="status", type="boolean", options={"comment":"1:未到帐 2到帐"})
     */
    private $status;

    /**
     * @var string
     *
     * @ORM\Column(name="money", type="decimal", precision=10, scale=2,  nullable=true, options={"comment"="金额"})
     */
    private $money;

    /**
     * @var string
     *
     * @ORM\Column(name="order_no", type="string", length=45,  options={"comment":"订单号"})
     */
    private $order_no;

    /**
     * @var string
     *
     * @ORM\Column(name="trade_no", type="string", length=120, nullable=true, options={"comment":"第三方交易号"})
     */
    private $trade_no;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"更新时间"})
     */
    private $updatedAt;

}
